<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    <link rel="stylesheet" type="text/css" href="css/common.css"/>
    <link rel="stylesheet" type="text/css" href="css/TeacherInfo.css"/>
    <link rel="stylesheet" href="css/StudentLeft.css">
    <script src="js/jquery-1.9.1.min.js" type="text/javascript"
            charset="utf-8"></script>
    <script>
        function add() {
            window.location.href = "StudentAdd.jsp";
        }

        function edit(id) {
            window.location.href = "Stu_Get_Action?id=" + escape(id);
        }

        function del(id) {
            window.location.href = "Stu_Del_Action?id=" + escape(id);
        }
    </script>
    <style>
        dd {
            text-align: center;
        }

        #btn {
            width: 100px;
            height: 30px;
            line-height: 30px;
            background: #177ec1;
            outline: none;
            border: none;
            color: #fff;
            font-size: 17px;
            -webkit-border-radius: 3px;
            -moz-border-radius: 3px;
            -ms-border-radius: 3px;
        }
    </style>
</head>
<body>
<s:debug/>
<s:if test="#request.student==null">
    <s:action name="Stu_Index_Action" executeResult="true"/>
</s:if>
<div class="container flgure">
    <s:include value="left.jsp"/>
    <div class="content">
        <div class="basic">
            <div style="text-align:right; padding:20px;">
                <input type="button" value="添加" id="btn" onclick="add()">
            </div>
            <div class="basicInfo select active">
                <dl class="table-title">
                    <dt style='width:5%'>序号</dt>
                    <dt style='width:10%'>学号</dt>
                    <dt style='width:8%'>姓名</dt>
                    <dt style='width:5%'>性别</dt>
                    <dt style='width:5%'>民族</dt>
                    <dt style='width:12%'>出生日期</dt>
                    <dt style='width:5%'>政治面貌</dt>
                    <dt style='width:10%'>手机号码</dt>
                    <dt style='width:20%'>教育经历</dt>
                    <dt style='width:20%'>操作</dt>
                </dl>


                <dd>标签，表示每一位学生的所有信息
                    <s:iterator value="stulist" var="stu">
                        <dl>
                            <dd style='width:5%'>
                                <s:property value="#stu.stuId"/>
                            </dd>

                            <dd style='width:10%'>
                                    <%--学号--%>
                                <s:property value="#stu.stuNum"/>
                            </dd>
                            <dd style='width:8%'>
                                    <%--姓名--%>
                                <s:property value="#stu.stuName"/>
                            </dd>
                            <dd style='width:5%'>
                                    <%--性别--%>
                                <s:property value="#stu.sex"/>
                            </dd>
                            <dd style='width:5%'>
                                    <%--民族--%>
                                <s:property value="#stu.nation"/>
                            </dd>
                            <dd style='width:12%'>
                                    <%--出生日期--%>
                                <s:property value="#stu.birthday"/>
                            </dd>
                            <dd style='width:5%'>
                                    <%--政治面貌--%>
                                <s:property value="#stu.politics"/>
                            </dd>
                            <dd style='width:10%'>
                                    <%--电话--%>
                                <s:property value="#stu.phone"/>
                            </dd>
                            <dd style='width:20%;height:auto;line-height: initial;'>
                                    <%--教育经历--%>
                                <s:iterator value="schoolList" var="school">
                                    <s:property value="#school.schoolType"/>:
                                    <s:property value="#school.schoolName"/>
                                </s:iterator>
                            </dd>
                            <dd style='width:20%'>
                                <input type="button" value="修改"
                                       onclick="edit(<s:property value="#stu.stuId"/>)"/> <input
                                    type="button" value="删除"
                                    onclick="del(<s:property value="#stu.stuId"/>)"/>
                            </dd>
                        </dl>
                    </s:iterator>
                </dd>
            </div>
        </div>
    </div>

</div>
</body>
</html>
